home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / nslock15 / module1.bas < prev    next >
BASIC Source File  |  1999-02-03  |  1KB  |  39 lines

  1. Attribute VB_Name = "Module1"
  2. Option Explicit
  3.  
  4. ' This sample project requires ActiveLock control
  5. ' You may download ActiveLock free of charge at
  6. ' http://www.insite.com.br/~nferraz/activelock
  7.  
  8. Sub Main()
  9.  
  10.   Load frmRegister
  11.   Load Calculator
  12.   
  13.   With frmRegister.ActiveLock1
  14.     ' If the user have registered, then shows the main form
  15.     If .RegisteredUser Then
  16.       Calculator.Show
  17.     Else
  18.       ' If he/she haven't registered yet, check if
  19.       ' the user tried to fool ActiveLock by changing
  20.       ' the time settings
  21.       If .LastRunDate > Now Then
  22.         MsgBox "ActiveLock has detected that you've changed the clock backwards!"
  23.       End If
  24.  
  25.       ' Check the evaluation period
  26.       If .UsedDays < 21 Then
  27.         frmRegister.Show 1
  28.         Calculator.Show
  29.       Else
  30.         ' If the evaluation period has expired...
  31.         MsgBox "Your evaluation period has expired!"
  32.         Unload frmRegister
  33.         Unload Calculator
  34.       End If
  35.     End If
  36.   End With
  37.  
  38. End Sub
  39.